<?php
/**
 * more modifiers
 * 
 * $path|path.dir}
 * {$path|path.name}
 * {$path|path.ext|upper}
 * {$bytes|format.m(3)}
 * 
 * @version $Id: IMintCommonModifier.php 312 2008-04-23 16:29:38Z iwind $
 * @package util.mint.modifier
 * @since 0.1
 */

/**
 * Enter description here...
 *
 * @param unknown_type $path
 * @return unknown
 * @since 0.1
 */
function mint_path_dir_modifier($path) {
	return pathinfo($path, PATHINFO_DIRNAME);
}

/**
 * Enter description here...
 *
 * @param unknown_type $path
 * @return unknown
 * @since 0.1
 */
function mint_path_ext_modifier($path) {
	return pathinfo($path, PATHINFO_EXTENSION);
}

/**
 * Enter description here...
 *
 * @param unknown_type $path
 * @return unknown
 * @since 0.1
 */
function mint_path_name_modifier($path) {
	return pathinfo($path, PATHINFO_BASENAME);
}

/**
 * Enter description here...
 *
 * @param unknown_type $byte
 * @param unknown_type $precision
 * @return unknown
 * @since 0.1
 */
function mint_format_k_modifier($byte, $precision = 0) {
	return round($byte/1024, $precision);
}

/**
 * Enter description here...
 *
 * @param unknown_type $byte
 * @param unknown_type $precision
 * @return unknown
 * @since 0.1
 */
function mint_format_m_modifier($byte, $precision = 0) {
	return round($byte/1024/1024, $precision);
}

?>